package com.token.iot.bratterycharging.gateway;

import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.outstanding.framework.base.SpringContextHolder;
import com.outstanding.framework.core.BaseEnum;
import com.outstanding.framework.core.PendingException;

import io.netty.channel.ChannelHandlerContext;


/**
 * 设备指令处理器：即设备发送过来的指令处理器
 * @author chenzhixuan
 *
 */
public interface Oper  {
	

	public String getCode() ;
	
	public void setCode(String code);

	

	
	/**
	 * 
	 * @param b
	 * @param ctx
	 * @return 0 不用处理，1还需要调用sender进行回应
	 * @throws PendingException
	 */
	public abstract int  onCall(byte[] b,ChannelHandlerContext ctx) throws PendingException;
	
	

}
